package com.wtwd.campus.jdzc.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wtwd.campus.entity.Classes;
import com.wtwd.campus.model.ClassQueryModel;
import com.wtwd.campus.model.vo.ClassesVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author mjy
 * @date 2021/06/17
 * @description
 */
@Mapper
public interface JdzcClassMapper extends BaseMapper<Classes> {

    IPage<ClassesVO> queryList(@Param("page") IPage page, @Param("query") ClassQueryModel classQueryModel);

    List<Map<String,Object>> countClassByGradeIds(@Param("list") List<Integer> gradeIds);

    List<Map<String, Object>> listClassGradeByClassIds(String classIds);

    List<Map<String, Object>> listClassGradeByClassName(@Param("schoolId") Integer schoolId, @Param("classNames") Set<String> classNames);

    Integer getClassIdByClassId(@Param("id") Integer id);

    /**
     * 根据班级id获取一个班级的imei
     */
    List<String> getImeiListByClassId(@Param("classId") Integer classId);
}
